<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>20180518</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 <script src="../bootstrap-3.3.7-dist/js/jquery.js"></script>
    <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.css">
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <script type="text/javascript" src="axios.min.js"></script>
    <!-- <script src="../bootstrap-3.3.7-dist/js/npm.js"></script> -->
    <script src="vue.js"></script>
</head>
<body>
	<div class="container">
<input type="button" name="" value="按钮" placeholder="" @click="get()">	
	</div>
    <script type="text/javascript">
      var axjoxs = new Vue({
      	el:'.container',
      	data:{

      	},
      	methods:{
      		get:function(){
      			`this.http.axios.get('333.htnl')
					  .then(function (response) {
							alert(1);
					    console.log(response);
					  })
					  .catch(function (error) {
					    console.log(error);
							alert(2);
					  });

					// 可选地，上面的请求可以这样做
					this.$http.axios.get('333.html', {
					    params: {
					      ID: 12345
					    }
					  })
					  .then(function (response) {
					    console.log(response);
					  })
					  .catch(function (error) {
					    console.log(error);
					  });`
      		}
      	}
      })
    </script>
</body>
</html>